public class TopLayerEscape : UILayer
{
	private new void Update()
	{
		if (NavigationManager.instance.TopLayer() == base.gameObject && NavigationManager.instance.shouldGoBack)
		{
			TableTennisDialog.instance.ShowYesNo("Exit Game?", "Do you want to Exit this game?", "Stay", "Exit", OnExit);
		}
	}

	private void OnExit(bool success)
	{
		if (!success)
		{
			BehaviourSingletonInit<Notifications>.instance.OnExitApp();
			BehaviourSingleton<GGApplication>.instance.Quit();
		}
		NavigationManager.instance.Pop();
	}
}
